if (process.env.NODE_ENV === "development") {
  process.env.TAILWIND_MODE = "watch";
}
const { WeappTailwindcssDisabled } = require("./platform");

const {
  UniAppWeappTailwindcssWebpackPluginV4,
} = require("weapp-tailwindcss-webpack-plugin");

const TransformPages = require('uni-read-pages')
const tfPages = new TransformPages({
	includes: ['path', 'aliasPath', 'name', 'meta', 'title'] //需要获取包涵的字段
})

/**
 * @type {import('@vue/cli-service').ProjectOptions}
 */
const config = {
  configureWebpack: {
    plugins: [
	  new tfPages.webpack.DefinePlugin({
	  	ROUTES: JSON.stringify(tfPages.routes)
	  }),
      new UniAppWeappTailwindcssWebpackPluginV4({
        disabled: WeappTailwindcssDisabled,
      }),
    ],
  },
  //....
};

module.exports = config;
